/* 
 *  javascribd - Java client library for the Scribd API. 
 *  Copyright (C) 2009 by Marcel Eyke, http://code.google.com/p/javascribd/ 
 *  Use is subject to license terms of LGPL. See license.txt. 
 */
package com.google.code.javascribd.user;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.google.code.javascribd.connection.ScribdResponse;
import com.google.code.javascribd.type.ErrorType;
import com.google.code.javascribd.type.ResponseStatus;
import com.google.code.javascribd.type.SessionKey;

/**
 * This class is the POJO of the response to the user.login Scribd request.
 * 
 * @see <a
 *      href="http://www.scribd.com/developers/api?method_name=user.login">user.login
 *      specification on Scribd.com</a>
 * 
 * @author Marcel Eyke
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "user.login")
@XmlRootElement(name = "rsp")
public class LoginResponse implements ScribdResponse {

	@XmlAttribute(name = "stat")
	private ResponseStatus status;

	@XmlElement(name = "error")
	private ErrorType error;

	@XmlElement(name = "session_key")
	private SessionKey sessionKey;

	@XmlElement(name = "user_id")
	private Integer userId;

	@XmlElement(name = "username")
	private String userName;

	@XmlElement(name = "name")
	private String name;

	public ResponseStatus getStatus() {
		return status;
	}

	public ErrorType getError() {
		return error;
	}

	public SessionKey getSessionKey() {
		return sessionKey;
	}

	public Integer getUserId() {
		return userId;
	}

	public String getUserName() {
		return userName;
	}

	public String getName() {
		return name;
	}
}
